﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace Business
{
    public class JDAPIConfig : ConfigurationSection
    {
        public JDAPIConfig() { }

        [ConfigurationProperty("token")]
        public string token
        {
            get { return (string)this["token"]; }
            set { this["token"] = value; }
        }

        [ConfigurationProperty("app_key")]
        public string app_key
        {
            get { return (string)this["app_key"]; }
            set { this["app_key"] = value; }
        }

        [ConfigurationProperty("app_secret")]
        public string app_secret
        {
            get { return (string)this["app_secret"]; }
            set { this["app_secret"] = value; }
        }

        [ConfigurationProperty("url")]
        public string url
        {
            get { return (string)this["url"]; }
            set { this["url"] = value; }
        }

        [ConfigurationProperty("format")]
        public string format
        {
            get { return (string)this["format"]; }
            set { this["format"] = value; }
        }

        [ConfigurationProperty("v")]
        public string v
        {
            get { return (string)this["v"]; }
            set { this["v"] = value; }
        }


        private static JDAPIConfig _value;
        public static JDAPIConfig Value
        {
            get
            {
                if (_value == null)
                    _value = (JDAPIConfig)System.Configuration.ConfigurationManager.GetSection("JDAPIConfig");
                return _value;
            }
        }
    }
}
